<template>

	<!-- <button>测试1</button>
	
				<button @click="showDrawer" type="primary">右侧弹出 显示Drawer</button>
				<uni-drawer ref="showRight" mode="right" :mask-click="false">
					<scroll-view style="height: 100%;" scroll-y="true">
						<button @click="closeDrawer" type="primary">关闭Drawer</button>
						<view v-for="item in 60" :key="item">可滚动内容 {{ item }}</view>
					</scroll-view>
				</uni-drawer> -->
	<view>
		<hb-comment ref="hbComment" @add="add" @del="del" @like="like" @focusOn="focusOn" :deleteTip="'确认删除？'"
			:cmData="commentData" :paper_id="commentId" v-if="commentData"></hb-comment>
	</view>
</template>

<script>
	import hbComment from "@/components/hb-comment/hb-comment.vue"
	export default {
		components: {
			hbComment
		},
		data() {
			return {
				commentId:0,
				commentData: {
					"readNumer": 193,
					"commentSize": 12,
					"comment": [
					],
					id: 0
				}
			}
		},
		onLoad(options) {
			// console.log(JSON.stringify(options));
			console.log("开始查询文章评论信息"+options.id)
			uni.request({
				url: 'http://localhost:1011/order/comment/getbypid', //仅为示例，并非真实接口地址。
				data: {
					id: parseInt(options.id)+1
				},
				method: "POST",
				success: (res) => {
					console.log(res.data);
					console.log("查询到评论")
					this.commentData.comment = res.data.data;
					this.commentId=parseInt(options.id)+1
					console.log("赋值"+this.commentId)
				}
			});
			
		},
		methods: {

		}
	}
</script>

<style>

</style>
